#include<stdio.h>
#define SUM 100000
int main()
{
    float amount,aver,total;
    int i;
    for(i=1,total=0;i<=1000;i++)
    {
        printf("please enter amount\n");
        scanf("%f",&amount);
        total=total+amount;
        if(total>=SUM)break;
    }
    aver=total/i;
    printf("%f\n",aver);
}
